xenapi: Fix VDI:read_only, VDI:sharable and VBD:mode of XenAPI
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 10:31:08 +0000 (11:31 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 10:31:08 +0000 (11:31 +0100)
commitc9e8655cb793f0b0649c65b02f5963d41b43d334
treeeb37b609598137d18abe2ef31bc5827ae0ca2d0a
parente32808cc9cdd1527fc46c0c895848ccc661d1945
xenapi: Fix VDI:read_only, VDI:sharable and VBD:mode of XenAPI

I started a VM by using xm create, then I checked values of VDI
records and values of VBD records.  When I gave the following disk
modes to a disk parameter, I got the following values from the records.

               "r"    "w"    "w!"
VDI:read_only  True   True   True   <-- Always True!
VDI:sharable   True   True   True   <-- Always True!
VBD:mode       RO     RW     RO
                             ^^  <-- It should be RW.

This patch fixes the values of the records as follows.

               "r"    "w"    "w!"
VDI:read_only  True   False  False
VDI:sharable   False  False  True
VBD:mode       RO     RW     RW

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xm/xenapi_create.py